package com.dynamic.mybatis.core.toolkit;

import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.dynamic.mybatis.core.enums.ReturnType;

/**
 * @Description
 * @Author xs
 * @Date 2021/4/1 18:26
 */
public class ReturnTypeHolder {

    public static ReturnType getReturnType(String returnTypeName){
        if(StringUtils.isBlank(returnTypeName)){
            return null;
        }
        for(ReturnType returnType : ReturnType.values()){
            if(returnType.name().equals(returnTypeName.toUpperCase())){
                return  returnType;
            }
        }
        return null;
    }
}